ISCSession Interface
The following table contains information on the ISCSession interface:
Signature |
Description |
Valid Arguments |
---|---|---|
VARIANT_BOOL Open(IUnknown * Unit, VARIANT Level [optional], VARIANT Flags [optional]) |
Binds self to the intrinsic metamodel, persistence unit, or model set identified by the Unit parameter |
Unit:
Level:
Flags:
|
Example 27
The following example illustrates how to access an intrinsic metamodel using C++. The example uses an Application object from Example 1:
void AccessMetaModel( ISCApplicationPtr & scAppPtr ) { ISCSessionPtr scSessionPtr = scAppPtr->GetSessions()->Add(); // add a new // session // Open EMX intrinsic metamodel CComVariant varResult = scSessionPtr->Open(NULL, (long) SCD_SL_M1); // meta-model level if (varResult.vt == VT_BOOL && varResult.boolVal == FALSE) return; // … }
The following example illustrates how to access an intrinsic metamodel using Visual Basic .NET. The example uses an Application object from Example 1:
Public Sub AccessMetaModel( ByRef scApp As SCAPI.Application ) Dim scBag As SCAPI.PropertyBag Dim scSession As SCAPI.Session ' Get a property bag with the EM2 metadata class scBag = scApp.ApplicationEnvironment.PropertyBag("Application ", "EM2 Metadata Class") ' Open EM2 intrinsic metamodel scSession = scApp.Sessions.Add scSession.Open( scBag, SCD_SL_M1 ) End Sub
Copyright © 2025 Quest Software, Inc. |